#!perl
################################################################################
# WeBWorK Online Homework Delivery System
# Copyright  2000-2018 The WeBWorK Project, http://openwebwork.sf.net/
# 
# This program is free software; you can redistribute it and/or modify it under
# the terms of either: (a) the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any later
# version, or (b) the "Artistic License" which comes with this package.
# 
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See either the GNU General Public License or the
# Artistic License for more details.
################################################################################

# This file should be used to override any of the default settings in defaults.config.
# The most commonly changed settings are provided as examples below, but any directive
# in defaults.config can be copied to this file with the value changed.
# If you wish to make changes to an individual course, copy the entry into the
# course.conf file in the respective course directory.

################################################################################
# localOverrides.conf  -- this file
################################################################################

# localOverrides.conf contains the local modifications commonly made
# when installing WeBWorK on a new site. The configurations in defaults.config
# and in database.conf can usually remain untouched.
#
# localOverride.conf is the appropriate place to override permission settings, 
# paths to macros and other customizations that are specific to your 
# WeBWorK site



################################################################################
# Additional mail settings in defaults.conf can be overridden here
################################################################################

# This setting is only used if you need to send email from within a PG problem
# (e.g. surveys, essay questions).  It is not necessary for using the email
# tools in WeBWorK.  You can set email addresses here for users who need to 
# receive email from problems in all courses, or in course.conf for professors
# who will receive email from problems in a single course. 

$mail{feedbackRecipients}    = [
	#'prof1@yourserver.yourdomain.edu',
	#'prof2@yourserver.yourdomain.edu',
];

### additional mail overrides
# Use this to customize the text of the feedback button.
$feedback_button_name = "Email WeBWorK TA";



################################################################################
# Repository Information
###############################################################################
# This is where you put your remote and branch for your WeBWorK, PG and OPL
# github repositories.  
# To disable checking for a particular repository, set the remote and branch
# variables to be empty strings.  

# Note:  This process uses git ls-remote which can be very slow on some 
# systems.  If your course list page in the admin course is very slow
# consider disabling this option.  

$enableGitUpgradeNotifier = 0;

$gitWeBWorKRemoteName = "origin";
$gitWeBWorKBranchName = "master";
$gitPGRemoteName = "origin";
$gitPGBranchName = "master";
$gitLibraryRemoteName = "origin";
$gitLibraryBranchName = "master";

################################################################################
# Theme
################################################################################

$defaultTheme = "math4";
$defaultThemeTemplate = "system";

################################################################################
# Language
################################################################################

$language = "en";   
# Check the directory .../webwork2/lib/WeBWorK/Localize to what languages are
# currently supported (e.g. en, es,. fr, heb, tr, zk_hk).

################################################################################
# Default screen header files
################################################################################

# This is the site_info file.  You should consider changing this to point
# to a file which is not tracked by git
$webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt";
#$webworkFiles{site_info} = "$webworkDirs{htdocs}/our_site_info.txt";


# The setHeader preceeds each set in hardcopy output. It is a PG file.
# This is the default file which is used if a specific files is not selected

$webworkFiles{hardcopySnippets}{setHeader}     = "$webworkDirs{conf}/snippets/ASimpleCombinedHeaderFile.pg";

#$webworkFiles{hardcopySnippets}{setHeader}     = "$courseDirs{templates}/ASimpleHardCopyHeaderFile.pg"; # An alternate default hardcopy only header file
#$webworkFiles{hardcopySnippets}{setHeader}     = "$courseDirs{templates}/ASimpleCombinedHeaderFile.pg";

# The set header is displayed on the problem set page. It is a PG file.
# One of these default files which is used if a specific files is not selected

$webworkFiles{screenSnippets}{setHeader}         = "$webworkDirs{conf}/snippets/ASimpleCombinedHeaderFile.pg"; 

# $webworkFiles{screenSnippets}{setHeader}         = "$courseDirs{templates}/ASimpleScreenHeaderFile.pg"; # An alternate default screen HTML only header file
# $webworkFiles{screenSnippets}{setHeader}         = "$courseDirs{templates}/ASimpleCombinedHeaderFile.pg";


################################################################################
# NationalProblemLibrary -- OpenProblemLibrary
################################################################################


# For configuration instructions, see:
# http://webwork.maa.org/wiki/National_Problem_Library
# The directory containing the natinal problem library files. Set to "" if no problem
# library is installed.
# NationalProblemLibrary (NPL) has been renamed to OpenProblemLibrary (OPL)

$problemLibrary{root}       = "/opt/webwork/libraries/webwork-open-problem-library/OpenProblemLibrary";
$contribLibrary{root}       = "/opt/webwork/libraries/webwork-open-problem-library/Contrib";
$problemLibrary{version}    = "2.5";  

# These flags control if statistics on opl problems are shown in the library
# browser.  If you want to include local statistics you will need to
# run webwork2/bin/update-OPL-statistics on a regular basis.  
$problemLibrary{showLibraryLocalStats} = 1;
# This flag controls whether global statistics will be displayed
$problemLibrary{showLibraryGlobalStats} = 1;

# Additional library buttons can be added to the Library Browser (SetMaker.pm)
# by adding the libraries you want to the following line.  For each key=>value
# in the list, if a directory (or link to a directory) with name 'key' appears
# in the templates directory, then a button with name 'value' will be placed at
# the top of the problem browser.  (No button will appear if there is no
# directory or link with the given name in the templates directory.)  For
# example,
# 
#     $courseFiles{problibs} = {rochester => "Rochester", asu => "ASU"};
# 
# would add two buttons, one for the Rochester library and one for the ASU
# library, provided templates/rochester and templates/asu exists either as 
# subdirectories or links to other directories. The "NPL Directory" button
# activated below gives access to all the directories in the National 
# Problem Library.
 
$courseFiles{problibs}    = {
	Library          => "OPL Directory",
    capaLibrary      => "CAPA",
    Contrib          => "Contrib",
# the following are not really needed but you can 
# create links to your own private libraries this way. 
# 	rochesterLibrary => "Rochester",
# 	unionLibrary     => "Union",
# 	asuLibrary       => "Arizona State",
# 	dcdsLibrary      => "Detroit CDS",
# 	dartmouthLibrary => "Dartmouth",
# 	indianaLibrary   => "Indiana",
# 	osuLibrary       => "Ohio State",	

};


################################################################################
# Permission levels
################################################################################

# The default roles are defined in defaults.config.  To change the list of available
# roles, copy the %userRoles hash from defaults.config into this file with the
# appropriate changes.

# User roles in order of increasing permissions. Each level has all of the privileges of
# the lower levels.
# 	guest 
# 	student 
# 	login_proctor
# 	grade_proctor
# 	ta 
# 	professor 
# 	admin

# The complete list of permissions is available in defaults.config.  If you want
# to change the lowest role which has that permission, use the following syntax:

#  $permissionLevels{login} = "guest";

# The above code would give the permission to login to any user with permission
# level guest or higher.

$permissionLevels{dont_log_past_answers} = undef;   #controls logging of the responses to a question
                                                    # in the past answer data base
                                                    # and in the myCourse/logs/answer_log file.
                                                    # Activities of users with this permission enabled are not entered
                                                    # in these logs.  This might be used when collecting student data
                                                    # to avoid contaminating the data with TA and instructor activities.
                                                    # The undef setting means that even professor answers are logged and 
                                                    # saved in the past answer database.
#$permissionLevels{record_set_version_answers_when_acting_as_student} = "professor";
#$permissionLevels{record_answers_when_acting_as_student} = "professor";

################################################################################
# Default settings for the problem editor pages
################################################################################

# This sets if the PG editor should use a js based "codemirror" editor or
# just a textarea
$options{PGCodeMirror} = 1;

# This sets if mathview is available on the PG editor for use as a minimal latex equation editor
$options{PGMathView} = 0;
$options{PGWirisEditor} = 0;
$options{PGMathQuill} = 0;

################################################################################
# PG subsystem options
################################################################################

# List of enabled display modes. Comment out any modes you don't wish to make
# available for use.
$pg{displayModes} = [
#	"plainText",     # display raw TeX for math expressions
	"images",        # display math expressions as images generated by dvipng
	"MathJax",       # render TeX math expressions on the client side using MathJax --- we strongly recommend people install and use MathJax, and it is requred if you want to use mathview
];

# Default display mode. Should be an uncommented item listed above.
$pg{options}{displayMode}        = "MathJax";

#$webworkURLs{MathJax} = "$server_root_url/$webworkURLs{htdocs}/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML-full";
$webworkURLs{MathJax} = "$webworkURLs{htdocs}/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML-full";
#$webworkURLs{MathJax} = "https://cdn.rawgit.com/mathjax/MathJax/2.7.1/MathJax.js?config=TeX-MML-AM_HTMLorMML-full";
#$webworkURLs{MathJax} = "https://cdn.rawgit.com/mathjax/MathJax/2.7.1/MathJax.js?config=TeX-AMS_CHTML-full";

 
################################################################################
#  Adding to the macro file search path. (Check with entries in defaults.config before overriding)
################################################################################
# The list of directories searched by loadMacros() when it looks for a .pl file
# is defined in defaults.config.
# To add a directory to this list, use the following syntax:
#
#  $pg{directories}{macrosPath} = [@{$pg{directories}{macrosPath}},"/path/to/new/location"];
#
# If your new directory is a subdirectory of the National Problem Library, you may use the prefix of
# $courseDirs{templates}/Library/ (such as "$courseDirs{templates}/Library/mymacrosdir")
# Note: This will look for macro files in your new location only after checking all of the locations
# already defined in defaults.config.
# You may reverse the order of the two arguments above AT YOUR OWN RISK, as this will check your
# new location even before the local directory of the problem, so your new location will take
# precedence over all other locations.

################################################################################
# Adding to the applet search path.
################################################################################

# If a full URL is given, it is used unmodified. If an
# absolute path is given, the URL of the local server is prepended to it.
# 
# For example, if an item is "/math/applets",
# and the local server is  "https://math.yourschool.edu",
# then the URL "https://math.yourschool.edu/math/applets" will be used.
# 
# If your new applets location is a subdirectory of the webwork htdocs directory, you may
# use notation such as "$webworkURLs{htdocs}/newsubdir"

# $pg{directories}{appletPath} = [ @{$pg{directories}{appletPath}} , "new/url" ];

################################################################################
# Problem creation defaults
################################################################################

# The default weight (also called value) of a problem to use when using the 
# Library Browser, Problem Editor or Hmwk Sets Editor to add problems to a set
# or when this value is left blank in an imported set definition file.

$problemDefaults{value} = 1;  

# The default max_attempts for a problem to use when using the 
# Library Browser, Problem Editor or Hmwk Sets Editor to add problems to a set
# or when this value is left blank in an imported set definition file.  Note that 
# setting this to -1 gives students unlimited attempts.

$problemDefaults{max_attempts} = -1;   

# The default showMeAnother for a problem to use when using the 
# Library Browser, Problem Editor or Hmwk Sets Editor to add problems to a set
# or when this value is left blank in an imported set definition file.  Note that 
# setting this to -1 disables the showMeAnother button
$problemDefaults{showMeAnother} = -1;   

# The default prPeriod value (re-randomization period) to use for the newly created problem.
# It is suggested to use the value of -1, which means that the course-wide setting would be used
# Setting this to -1 defaults to the use of course-wide settings (suggested)
# Setting this to 0 disables periodic randomization regardless of the course-wide setting
# Setting this to a positive value will override the course-wide setting
$problemDefaults{prPeriod} = -1;


################################################################################
# Periodic re-randomization
################################################################################
# switch to enable periodic re-randomization
$pg{options}{enablePeriodicRandomization} = 0;
# course-wide default period for re-randomization, should be an integer
# the value of 0 disables re-randomization
$pg{options}{periodicRandomizationPeriod} = 5;


################################################################################
# "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.)
################################################################################

 $pg{specialPGEnvironmentVars}{DragMath} = 0;
 $pg{specialPGEnvironmentVars}{CAPA_Tools}             = "$courseDirs{templates}/Contrib/CAPA/macros/CAPA_Tools/",
 $pg{specialPGEnvironmentVars}{CAPA_MCTools}           = "$courseDirs{templates}/Contrib/CAPA/macros/CAPA_MCTools/",
 $pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{templates}/Contrib/CAPA/CAPA_Graphics/",
 push @{$pg{directories}{macrosPath}},  
   "$courseDirs{templates}/Contrib/CAPA/macros/CAPA_Tools",
   "$courseDirs{templates}/Contrib/CAPA/macros/CAPA_MCTools";

 # The link Contrib in the course templates directory should point to ../webwork-open-problem-library/Contrib 

################################################################################
#  Configuring the display of different versions of the editors
################################################################################
# These configurations can be placed in course.conf file to tune the behavior for individual courses

# These will enable the versions of the problem set detail page and library browser page
# that do not use the xmlrpc pathway

#$showeditors{problemsetdetail1} = 1;
#$showeditors{librarybrowsernojs} = 1;

# This will enable the PG problem editor 3

$showeditors{pgproblemeditor3} = 1;
$showeditors{pgproblemeditor2} = 0;
$showeditors{simplepgeditor}   = 0;

# This will turn off ww3 
#$showeditors{ww3} = 0;

# Similar changes can be made in the same way for other editors.  
# Look at the relevant section of default.config to
# see the default settings for each editor.
# (The syntax is slightly different there because the configurations
# for all of the editors are being set in the configuration hash.)
################################################################################
# Directory for temporary files
################################################################################ 
# Location of web-accessible temporary files, such as equation images. 
# Default which is set in defaults.config:
#$webworkDirs{htdocs_temp}   = "$webworkDirs{htdocs}/tmp";
#$webworkURLs{htdocs_temp}   = "$webworkURLs{htdocs}/tmp";

# Alternate locations -- this allows you to place temporary files in a location 
# that is not backed up and is the recommended set up for most installations.
# See http://webwork.maa.org/wiki/Store_WeBWorK%27s_temporary_files_in_a_separate_directory_or_partition
# for more information.   Note that the wwtmp directory (or partition) should be 
# created under Apache's main server document root which is usually /var/www. If this 
# is in a different location on your system, edit the lines below accordingly.
# To implement, uncomment the following 6 lines:
#$webworkDirs{htdocs_temp}  =  '/var/www/wwtmp';
#$webworkURLs{htdocs_temp}   = '/wwtmp';
#$webworkDirs{equationCache} = "$webworkDirs{htdocs_temp}/equations";
#$webworkURLs{equationCache} = "$webworkURLs{htdocs_temp}/equations";
#$courseDirs{html_temp}  =  "/var/www/wwtmp/$courseName";
#$courseURLs{html_temp}   = "/wwtmp/$courseName";

#####################
# Additional PG modules
#####################

#push (@{${pg}{modules}}, [qw(TikZ_Image2)]);
################################################################################ 
# Student Date Format
################################################################################

# Uncomment the following line to customize the format of the dates displayed to
# students.  As it is written, the line below will display open, due and answer
# dates in the following format: Wed Jun 27 at 10:30am
# For all available options, consult the documentation for perl DateTime under
# "strftime patterns".
# $studentDateDisplayFormat="%a %b %d at %l:%M%P";

################################################################################
# Using R with WeBWorK
################################################################################

# To enable Rserve (the R statistical server) in WeBWorK, uncomment the
# following line.  The R server needs to be installed and running in order for
# this to work.  See http://webwork.maa.org/wiki/R_in_WeBWorK for more info.

# $pg{specialPGEnvironmentVars}{Rserve} = {host => "localhost"};

# use this setting when running Rserve in a docker container.
# $pg{specialPGEnvironmentVars}{Rserve} = {host => "r"};


################################################################################
# Serving Opaque client questions to moodle
################################################################################


# this snippet checks to see if Moodle has already called MathJax
# $pg{specialPGEnvironmentVars}{problemPreamble} = { TeX => '', HTML=> <<END_PREAMBLE };
# 
# 	<script type="text/x-mathjax-config">
# 	if (MathJax.Hub.Startup.params.config && MathJax.Hub.config.config.length) {
# 	    MathJax.Hub.Config({
# 	      config: [],
# 	      skipStartupTypeset: false
# 	    });
# 	  }
# 	</script>
# END_PREAMBLE

################################################################################
# Authentication Methods
################################################################################

# Extra modules have been created to allow WeBWorK to use certain external
# methods of authentication.

################################################################################
# IMS LTI Authentication
################################################################################

# Uncomment the following line to enable authentication via IMS LTI.
# You will have to copy the file authen_LTI.conf.dist to authen_LTI.conf,
# and then edit that file to fill in the settings for your installation.

#include("conf/authen_LTI.conf");
# default settings
#$debug_lti_parameters = 0; 
#$debug_lti_grade_passback = 0;

# Set debug_lti_parameters  to 1 to have LTI calling parameters printed to HTML page for
# debugging.  This is useful when setting things up for the first time because
# different LMS systems have different parameters

# To get more information on passing grades back to the LMS enmass set debug_lti_grade_passback
# to one.  And set the LTIMassUpdateInterval to 60 (seconds).

# This will print into the apache log the success or failure of updating each user/set.
# If the set has "no lis_source_did" then that set hasn't been assigned, or the user is an instructor
# and not a student.

# Setting both debug_lti_parameters and debug_lti_grade_passback will cause the full request and 
# response between the LMS and WW to be printed into apache error log file for each
# user/set  update of the grade.

# The switches above can be set in course.conf to enable debugging for just one course.

# If you want even more information enable the debug facility for SubmitGrade.pm in 
# the WeBWorK::Constants file.  
# This will print extensive debug messages for all courses.



################################################################################
# LDAP Authentication
################################################################################
# Uncomment the following line to enable authentication via an LDAP server.
# You will have to copy the file authen_ldap.conf.dist to authen_ldap.conf,
# and then edit that file to fill in the settings for your installation.

#include("conf/authen_ldap.conf");

################################################################################
# Session Management
################################################################################

## For a discussion of session_management_via session_cookies or the
## Key database, see the   Session Managment section
## of defaults.config.dist

## For session management using the key database table, uncomment the following line,
## which will override the setting  $session_management_via = "session_cookie"
## set in defaults.config.

#  $session_management_via = "key";

################################################################################
# Searching for set.def files to import 
################################################################################
## Uncomment below so that when the homework sets editor searches for set def
## files, it searches beyond templates; it can search deeper subfolders of 
## templates, and optionally also descend into Library

$options{setDefSearchDepth}=4; #search down 4 levels
$options{useOPLdefFiles}=1;

################################################################################
# Permission overrides (e.g. "admin", "professor", "ta", "student", "guest"
################################################################################

 $permissionLevels{show_resource_info} 				= "admin";
 $permissionLevels{show_pg_info_checkbox}            = "admin";
 $permissionLevels{show_answer_hash_info_checkbox}	= "admin";
 $permissionLevels{show_answer_group_info_checkbox}	= "admin";

 $permissionLevels{modify_tags} = "admin";

################################################################################

# Available Hardcopy themes (located in snippets) - adds four XeLaTeX themes
# using polyglossia for multilingual support and fontspec.

$hardcopyThemes = [ qw (
	oneColumn
	twoColumn
	XeLaTeX-oneColumn
	XeLaTeX-twoColumn
	XeLaTeX-Hebrew-oneColumn
	XeLaTeX-Hebrew-twoColumn
)];

# Hardcopy theme names (pretty names for themes)
$hardcopyThemeNames = {
        oneColumn => 'pdfLaTeX - English - One Column',
        twoColumn => 'pdfLaTeX - English - Two Columns',
	XeLaTeX-oneColumn => 'XeLaTeX - English - one Column',
	XeLaTeX-twoColumn => 'XeLaTeX - English - two Columns',
        XeLaTeX-Hebrew-oneColumn => 'XeLaTeX - Hebrew/English - one Column',
        XeLaTeX-Hebrew-twoColumn => 'XeLaTeX - Hebrew/English - two Columns',
};

# Change default Hardcopy theme - in order to use an XeLaTeX theme, we must set
#    $externalPrograms{pdflatex} to use xelatex (here or in site.conf) !!!
#$hardcopyTheme = "XeLaTeX-twoColumn";
#$externalPrograms{pdflatex} ="/usr/bin/xelatex --shell-escape";

################################################################################

1; #final line of the file to reassure perl that it was read properly.
